package com.lhl.task;

import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;

/**
 * Job示例
 * @author Liu Hanlin
 * @create 2024-11-05 23:26
 */
public class DemoJob extends BaseJob<DemoJob.DemoParam>{


    @Override
    public void execute(JobExecutionContext jobExecutionContext, DemoParam params) {
        System.out.println("执行任务，参数为：" + params.myParam.toString());
    }

    public static class DemoParam extends BaseJob.BaseParams{
        String myParam;

        public String getMyParam() {
            return myParam;
        }


        public void setMyParam(String myParam) {
            this.myParam = myParam;
        }

        @Override
        public String toString() {
            return "DemoParam{" +
                    "myParam='" + myParam + '\'' +
                    '}';
        }
    }
}
